﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MQXT.Repository
{


    public class EdgeConfig
    {
        //public static string GetCurrentProjectPath
        //{

        //    get
        //    {
        //        return ConfigurationManager.AppSettings["TCPIP_PortName"];  // Environment.CurrentDirectory.Replace(@"\bin\Debug", "");
        //    }
        //}
        public static string ConnectionString = "";// @"DataSource=" + GetCurrentProjectPath + @"\DataBase\DTSN.ControlService.sqlite"; 
        public static DbType DbType = DbType.MySql;

        public static void SetDbTypes(int type = 0)
        {
            switch (type)
            {
                case 0: DbType = DbType.MySql; break;
                case 1: DbType = DbType.SqlServer; break;
                case 2: DbType = DbType.Sqlite; break;
                case 3: DbType = DbType.Oracle; break;
                case 4: DbType = DbType.PostgreSQL; break;
            }
        }
    }

}
